package com.matt.foundation.vo.liveRecord;

import lombok.Data;
import org.apache.commons.lang.StringUtils;

import java.util.Objects;

/**
 * *******************************
 * Created by Ron.
 * form com.matt
 * on 2017/7/11
 * *******************************
 */
@Data
public class RecordChildVo {

    private String name;

    private String imgUrl;

    private String gender;

    private String classId;

    private String className;

    public static RecordChildVo of(Object[] objects) {
        RecordChildVo vo = new RecordChildVo();
        vo.setName(objects[0] == null ? "" : objects[0].toString());
        if (Objects.nonNull(objects[1]) && StringUtils.isNotBlank(objects[1].toString()))
            vo.setImgUrl(objects[1].toString());
        vo.setGender(objects[2] == null ? "" : objects[2].toString());
 /*       vo.setClassId(objects[3] == null ? "" : objects[3].toString());
        vo.setClassName(objects[4] == null ? "" : objects[4].toString());*/
        return vo;
    }

}
